Skip to main content

All Questions

0votes
1answer
187views

Getting three numbers input interactively and process them

I'm new to Python and programming in general. Let's imagine I have a simple task: Given 3 numbers from user input, I need to count negative ones and print the result. Considering what I know about ...
QLEDHDTV's user avatar
3votes
1answer
250views

LeetCode 1115: Print FooBar Alternately

I'm posting two solutions for LeetCode's "Print FooBar Alternately". If you'd like to review, please do. Thank you! Problem Suppose you are given the following code: ...
Emma's user avatar
  • 3,592
1vote
1answer
259views

LeetCode 863: All Nodes Distance K in Binary Tree

I'm posting two similar solutions for LeetCode's "All Nodes Distance K in Binary Tree". If you'd like to review, please do so. Thank you! Problem We are given a binary tree (with root node <...
Emma's user avatar
  • 3,592
5votes
4answers
6kviews

Finding the longest substring in alphabetical order

I wrote code in Python that takes a string s as input and determines the longest substring of s that’s in alphabetical order. In ...
ChrisIkeokwu's user avatar
12votes
3answers
658views

Becoming the greatest tower builder

I am trying to learn how to write proper code in python, and stumbled upon the following problem. Bob is given a set of building blocks b, and a number ...
N3buchadnezzar's user avatar

close